package org.example.design.group02.service.engine;

import org.example.design.group02.model.aggregates.TreeRich;
import org.example.design.group02.model.vo.EngineResult;
import org.example.design.group02.model.vo.TreeNode;

import java.util.Map;

/**
 * @Classname TreeEngineHandle
 * @Description TODO
 * @Date 2020/11/4 9:36 上午
 * @Created by xiangjd
 */
public class TreeEngineHandle extends EngineBase {
    @Override
    public EngineResult process(Long treeId, String userId, TreeRich treeRich, Map<String, String> decisionMatter) {
        TreeNode treeNode = engineDecisionMaker(treeRich, treeId, userId, decisionMatter);
        return new EngineResult(userId, treeId, treeNode.getTreeNodeId(), treeNode.getNodeValue());
    }
}
